/*
 * Copyright (c) 馬駿朱 13921877634 2025.
 */

package com.bng8.majunzhu.controller;

import com.bng8.majunzhu.entity.Inventory;
import com.bng8.majunzhu.service.InventoryService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;

import java.util.List;

/**
 * ClassName: majunzhu
 * Package: com.bng8.majunzhu.controller
 * Date: 2025/3/18 14:45
 * Author: 馬駿朱（13921877634）
 */

@Controller
public class BasicController {

    @Resource
    private InventoryService inventoryService;

    @GetMapping("/inventory")
    public String inventory(Model model) {
        List<Inventory> list = inventoryService.list();
        model.addAttribute("list", list);
        return "inventory";
    }
}
